package chapter3.No3_2_方法join的使用.demo3;

/**
 * *：
 *    方法join()与interrupt()如果彼此遇到，会出现异常。
 * Created by Administrator on 2016/11/20.
 */
public class Main {
    public static void main(String[] args) throws InterruptedException {
        ThreadB b = new ThreadB();
        b.start();
        Thread.sleep(2000);
        b.interrupt();
        System.out.println("main线程停止");
    }
}
